#include <sys/types.h>
#include <signal.h>
#include <iostream>
#include <unistd.h>
void usage(const char* proc)
{
    std::cout << proc << std::endl;
    std::cout << "Usage: " << getpid() << " " << "signal" << std::endl;
}
int main(int argc, char* argv[])
{
    if (argc != 3)
    {
        usage(argv[0]);
        exit(1);
    }
    pid_t id = atoi(argv[1]);
    int signal = atoi(argv[2]);
    int n = kill(id, signal);
    if (n == -1)
    {
        perror("kill");
        exit(-1);
    }
    return 0;
}